package com.itheima.health.service;

import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.exception.MyException;
import com.itheima.health.pojo.CheckGroup;

import java.util.List;

public interface CheckGroupService {
    /**
     * @Description: 添加检查组
     * @Param: [checkitemIds, checkGroup]
     * @return: void
     * @Author: HuChunping
     * @Date: 2021/1/8-20:10
     */
    void add(Integer[] checkitemIds, CheckGroup checkgroup);

    /**
     * @Description: 分页查询
     * @Param: [queryPageBean]
     * @return: com.itheima.health.entity.PageResult<com.itheima.health.pojo.CheckGroup>
     * @Author: HuChunping
     * @Date: 2021/1/9-17:09
     */
    PageResult<CheckGroup> findPage(QueryPageBean queryPageBean);

    /**
     * @Description: 通过id查询检查组
     * @Param: [id]
     * @return: com.itheima.health.pojo.CheckGroup
     * @Author: HuChunping
     * @Date: 2021/1/9-17:10
     */
    CheckGroup findById(int id);

    /**
     * @Description: 通过检查组id查询中间表获取勾选的检查项
     * @Param: [id]
     * @return: java.util.List<java.lang.Integer>
     * @Author: HuChunping
     * @Date: 2021/1/9-17:17
     */
    List<Integer> findCheckItemIdsByCheckGroupId(int id);

    /**
     * @Description: 编辑检查组
     * @Param: [checkitemIds, checkgroup]
     * @return: void
     * @Author: HuChunping
     * @Date: 2021/1/9-19:36
     */
    void update(Integer[] checkitemIds, CheckGroup checkgroup);

    /**
     * @Description: 通过id删除检查组
     * @Param: [id]
     * @return: void
     * @Author: HuChunping
     * @Date: 2021/1/9-19:36
     */
    void deleteById(int id) throws MyException;

    /**
     * @Description: 查询所有检查组
     * @Param: []
     * @return: java.util.List<com.itheima.health.pojo.CheckGroup>
     * @Author: HuChunping
     * @Date: 2021/1/10-17:09
     */
    List<CheckGroup> findAll();

}
